﻿using Basic.HrGatewayModular.Interface;
using Basic.HrRemoteModel.EmpTitle;
using Basic.HrRemoteModel.EmpTitle.Model;

namespace Basic.HrGatewayModular.Services
{
    internal class EmpTitleService : IEmpTitleService
    {
        public long AddEmpTitle ( EmpTitleAdd datum )
        {
            return new AddEmpTitle
            {
                Datum = datum,
            }.Send();
        }

        public void DeleteEmpTitle ( long id )
        {
            new DeleteEmpTitle
            {
                Id = id,
            }.Send();
        }

        public EmpTitleData GetEmpTitle ( long id )
        {
            return new GetEmpTitle
            {
                Id = id,
            }.Send();
        }

        public EmpTitleDatum[] GetEmpTitleList ( long empId, long companyId )
        {
            return new GetEmpTitleList
            {
                EmpId = empId,
                CompanyId = companyId
            }.Send();
        }

        public string[] GetTitles ( long empId, long deptId )
        {
            return new GetEmpDeptTitle
            {
                EmpId = empId,
                DeptId = deptId
            }.Send();
        }
    }
}
